<?php
/**
 * Created by 张彪.
 * User: 小马出行
 * Date: 2018/4/18
 * Time: 11:34
 */
namespace app\admin\inter_model;
use think\Model;
use think\Db;

class DriverAppTranModel extends Model
{
    public function addDriverAppTran($data)
    {
        return Db::table('inter_driver_app_tran')->insertGetId($data);
    }

    public function updateDriverAppTran($map,$data)
    {
        return Db::table('inter_driver_app_tran')->where($map)->update($data);
    }

    public function getDriverAppTran($map,$field='*',$page=1,$limit=10)
    {
        return Db::table('inter_driver_app_tran')->where($map)->field($field)->page($page,$limit)->order('id desc')->select();
    }

    public function searchDriverAppTran($map,$field='*')
    {
        return Db::table('inter_driver_app_tran')->where($map)->field($field)->find();
    }
}